# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=jansson
pkgver=2.14
pkgrel=0
pkgdesc="lightweight JSON library"
url="http://www.digip.org/jansson/"
arch="all"
license="MIT"
checkdepends="bash"
subpackages="$pkgname-dev"
source="https://github.com/akheron/jansson/releases/download/v$pkgver/jansson-$pkgver.tar.gz"

# secfixes:
#   0:
#     - CVE-2020-36325

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--disable-static
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
5a592776c7ba8c0b1f5efaf813f77948bbc4bda168a72d221d176af0cf61038e26c1f30795433be10e2fc5069d5763d11852a8574774906a9f8ad261ac30109c  jansson-2.14.tar.gz
"
